<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>气泡图</title>
    <script src="../../echarts.min.js"></script>
</head>
<body>
    <div id="main" style="height: 300px;width: 600px;"></div>
</body>
<script>
    let mychart = echarts.init(document.getElementById("main"))
    let option = {
        title:{
            text:"气泡图"
        },
        xAxis:{},
        yAxis:{},
        tooltip:{},
        series:[
            {
                data:[
                    [1,2,4],
                    [2,4,1],
                    [12,4,21],
                    [1.2,2.3,4.6],
                    [1.8,3.1,4.3],
                    [5.2,5.1,9],
                    [9.5,12.2,24],
                    [8.4,3.2,12.2],
                    [8.5,6.3,3.2]
                ],
                symbolSize:function(data){
                    return data[2]
                },
                type:"scatter"
            }
        ]
    }
    mychart.setOption(option)
</script>
</html>